#ifndef CHARACTERDATADELEGATE_H
#define CHARACTERDATADELEGATE_H

#include <D20CharacterModel.h>

#include <QItemDelegate>
#include <QPointer>


class CharacterDataDelegate : public QItemDelegate
{
    Q_OBJECT

public:

    CharacterDataDelegate(D20CharacterModel* sourceModel, QObject *parent = 0);

    virtual QWidget* createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
    virtual void setEditorData(QWidget *editor, const QModelIndex &index) const;
    virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;

protected:

    QPointer<D20CharacterModel> m_model;

};

#endif // CHARACTERDATADELEGATE_H
